package com.edu.exam.enums.core.base;

/**
 * 四舍五入规则枚举
 */
public enum RoundingRule {
    /**
     * 四舍五入
     */
    ROUND_HALF_UP("ROUND_HALF_UP", "四舍五入"),

    /**
     * 向上取整
     */
    ROUND_UP("ROUND_UP", "向上取整"),

    /**
     * 向下取整
     */
    ROUND_DOWN("ROUND_DOWN", "向下取整"),

    /**
     * 四舍六入
     */
    ROUND_HALF_EVEN("ROUND_HALF_EVEN", "四舍六入"),

    /**
     * 不舍不入
     */
    ROUND_NONE("ROUND_NONE", "不舍不入"),

    /**
     * 指定精度
     */
    SPECIFIC("SPECIFIC", "指定精度");

    private final String code;
    private final String description;

    RoundingRule(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}